<html>
<head><meta charset="utf-8"><title>panic: truncate extracted a pending value · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html">panic: truncate extracted a pending value</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185152107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152107">(Jan 08 2020 at 20:14)</a>:</h4>
<p>I've been investigating this issue a bit</p>



<a name="185152112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152112">(Jan 08 2020 at 20:14)</a>:</h4>
<p>I <em>think</em> I've found the problem</p>



<a name="185152121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152121">(Jan 08 2020 at 20:14)</a>:</h4>
<p>but wanted to ask you a question <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="185152163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152163">(Jan 08 2020 at 20:15)</a>:</h4>
<p>So, I'm using the <code>higher_ranked_inline_bound_on_gat</code> test with <code>max_size</code> of 3 to reproduce this</p>



<a name="185152183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152183">(Jan 08 2020 at 20:15)</a>:</h4>
<p>And essentially what I think is wrong is:</p>



<a name="185152258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152258">(Jan 08 2020 at 20:16)</a>:</h4>
<p>This goal <code>LocalImplAllowed(for&lt;1&gt; fn&lt;Ref&lt;'^0, !1_1&gt;&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code> gets truncated to <code>LocalImplAllowed(for&lt;1&gt; fn&lt;?0&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>



<a name="185152279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152279">(Jan 08 2020 at 20:16)</a>:</h4>
<p>Then that second goal gets canonicalized into <code>LocalImplAllowed(for&lt;1&gt; fn&lt;^1&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>



<a name="185152301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152301">(Jan 08 2020 at 20:16)</a>:</h4>
<p>When I think it should get canonicalized into <code>LocalImplAllowed(for&lt;1&gt; fn&lt;^0&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>



<a name="185152319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152319">(Jan 08 2020 at 20:17)</a>:</h4>
<p>Or maybe <code>LocalImplAllowed(for&lt;1&gt; fn&lt;'^0&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>



<a name="185152496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152496">(Jan 08 2020 at 20:19)</a>:</h4>
<p>But anyways, when the answer for that goal is generated, and it is attempted to apply in <code>apply_answer_subst</code> and trys to unify <code>Ref&lt;'^0, !1_1&gt;</code> and <code>^1</code>, it can't shift down by one because of the <code>'^0</code> in the first</p>



<a name="185152539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185152539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185152539">(Jan 08 2020 at 20:19)</a>:</h4>
<blockquote>
<p>When I think it should get canonicalized into <code>LocalImplAllowed(for&lt;1&gt; fn&lt;^0&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>
</blockquote>
<p>This is basically my question. Am I right here?</p>



<a name="185225671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185225671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185225671">(Jan 09 2020 at 16:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Do you have a minute to quickly talk about this?</p>



<a name="185225711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185225711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185225711">(Jan 09 2020 at 16:02)</a>:</h4>
<p>Gonna be traveling today, so might be able to try to fix this</p>



<a name="185226741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185226741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185226741">(Jan 09 2020 at 16:11)</a>:</h4>
<p>Actually, I don't think that inference variable should be changed to a bound var at all here</p>



<a name="185226801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185226801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185226801">(Jan 09 2020 at 16:12)</a>:</h4>
<p>Actually, I don't think that inference variable should be changed to a bound var at all here</p>



<a name="185226815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185226815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185226815">(Jan 09 2020 at 16:12)</a>:</h4>
<p>Shoot okay, that's what it is</p>



<a name="185504236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185504236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185504236">(Jan 13 2020 at 15:36)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="232957">@Jack Huey</span>, I have a minute right now</p>



<a name="185504329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185504329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185504329">(Jan 13 2020 at 15:37)</a>:</h4>
<blockquote>
<p>This goal <code>LocalImplAllowed(for&lt;1&gt; fn&lt;Ref&lt;'^0, !1_1&gt;&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code> gets truncated to <code>LocalImplAllowed(for&lt;1&gt; fn&lt;?0&gt;: Fn&lt;Ref&lt;'!1_0, !1_1&gt;&gt;)</code></p>
</blockquote>
<p>I think..this truncation is kind of wrong</p>



<a name="185504334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185504334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185504334">(Jan 13 2020 at 15:37)</a>:</h4>
<p>I've been wondering about truncation, actually</p>



<a name="185504408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185504408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185504408">(Jan 13 2020 at 15:38)</a>:</h4>
<p>In particular, I've been wondering if we should replace it with something like:</p>



<a name="185504415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185504415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185504415">(Jan 13 2020 at 15:38)</a>:</h4>
<p>if a goal would be truncated, just replace it with CannotProve</p>



<a name="185509294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185509294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185509294">(Jan 13 2020 at 16:28)</a>:</h4>
<p>(removed)</p>



<a name="185509373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185509373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185509373">(Jan 13 2020 at 16:29)</a>:</h4>
<p>Yeah, I've had some thoughts about truncation</p>



<a name="185509460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185509460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185509460">(Jan 13 2020 at 16:30)</a>:</h4>
<p>bit scattered right now, but I think just replacing it with CannotProve might work, but I think there might be a better solution</p>



<a name="185509591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185509591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185509591">(Jan 13 2020 at 16:31)</a>:</h4>
<p>re. that truncation in particular, the more I thought about it, the more "wrong" it felt</p>



<a name="185509601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185509601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185509601">(Jan 13 2020 at 16:31)</a>:</h4>
<p>but I can't put my finger on why</p>



<a name="185510055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510055">(Jan 13 2020 at 16:36)</a>:</h4>
<blockquote>
<p>if a goal would be truncated, just replace it with CannotProve</p>
</blockquote>
<p>actually what I really wanted was to flounder it, I think</p>



<a name="185510063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510063">(Jan 13 2020 at 16:36)</a>:</h4>
<p>basically, it's a kind of error case</p>



<a name="185510077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510077">(Jan 13 2020 at 16:37)</a>:</h4>
<p>truncation was inspired by other solvers</p>



<a name="185510095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510095">(Jan 13 2020 at 16:37)</a>:</h4>
<p>it has a solid foundation, of sorts, in the sense that (in theory) the solvers ought to be able to enumerate the full set of solutions</p>



<a name="185510111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510111">(Jan 13 2020 at 16:37)</a>:</h4>
<p>but I think for a variety of practical reasons that doesn't make sense in our setting</p>



<a name="185510277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510277">(Jan 13 2020 at 16:38)</a>:</h4>
<p>It seems like other than perf, all of rust-analyzer's issues have been from truncation</p>



<a name="185510323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510323">(Jan 13 2020 at 16:39)</a>:</h4>
<p>I basically think we should consider truncation an error case</p>



<a name="185510334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510334">(Jan 13 2020 at 16:39)</a>:</h4>
<p>i.e., it's not supposed to happen</p>



<a name="185510349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510349">(Jan 13 2020 at 16:39)</a>:</h4>
<p>this was always the idea</p>



<a name="185510392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510392">(Jan 13 2020 at 16:40)</a>:</h4>
<p>in my branches to fix the other issue (<a href="https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove" target="_blank" title="https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove">https://github.com/jackh726/chalk/tree/ambiguous_as_cannotprove</a>), I used CannotProve as a delayed_subgoal in the case of truncation</p>



<a name="185510405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510405">(Jan 13 2020 at 16:40)</a>:</h4>
<p>rustc has a similar policy around large types, but it just aborts compilation</p>



<a name="185510409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510409">(Jan 13 2020 at 16:40)</a>:</h4>
<p>I suspect we should just do the same</p>



<a name="185510422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510422">(Jan 13 2020 at 16:40)</a>:</h4>
<p>could be worth trying</p>



<a name="185510681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510681">(Jan 13 2020 at 16:42)</a>:</h4>
<p>but it will require us to probably fix some other problems for r-a</p>



<a name="185510696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510696">(Jan 13 2020 at 16:43)</a>:</h4>
<p>Biggest is perf I think</p>



<a name="185510713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185510713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185510713">(Jan 13 2020 at 16:43)</a>:</h4>
<p>(you already saw my <code>solve_limited</code> PR)</p>



<a name="185566944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185566944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185566944">(Jan 14 2020 at 05:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> floundering instead of truncating: <a href="https://github.com/rust-lang/chalk/pull/322" target="_blank" title="https://github.com/rust-lang/chalk/pull/322">https://github.com/rust-lang/chalk/pull/322</a></p>



<a name="185641714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185641714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185641714">(Jan 14 2020 at 21:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you around?</p>



<a name="185649593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185649593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185649593">(Jan 14 2020 at 22:45)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> you might be interested in testing out this branch with rust-analyzer, since it should fix a lot of bugs? <code>impl Trait</code> has returned yet, though</p>



<a name="185649734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185649734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185649734">(Jan 14 2020 at 22:46)</a>:</h4>
<p>And off topic, but I'm also curious of your thoughts on: <a href="https://github.com/rust-lang/chalk/pull/321" target="_blank" title="https://github.com/rust-lang/chalk/pull/321">https://github.com/rust-lang/chalk/pull/321</a></p>



<a name="185649743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185649743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185649743">(Jan 14 2020 at 22:46)</a>:</h4>
<p>I've tried to point Rust-analyzer to it, but hit some compiler errors. Looks like an API might have changed in the recent chalk. I haven't looked into this further though. cc <span class="user-mention" data-user-id="129457">@Florian Diebold</span> :D</p>



<a name="185649775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185649775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185649775">(Jan 14 2020 at 22:47)</a>:</h4>
<p>e.g. would being able to stop Chalk solving via a <code>should_panic</code> Fn be sufficient for now?</p>



<a name="185650933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185650933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185650933">(Jan 14 2020 at 23:00)</a>:</h4>
<p>What's <code>should_panic</code>? I only see <code>should_continue</code></p>



<a name="185650954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185650954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185650954">(Jan 14 2020 at 23:01)</a>:</h4>
<p>But I think I like <code>should_continue</code> -- seems the minimal thing that can possible work for our use-case</p>



<a name="185651244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651244">(Jan 14 2020 at 23:05)</a>:</h4>
<p>Oops, typo. <code>should_continue</code></p>



<a name="185651266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651266">(Jan 14 2020 at 23:05)</a>:</h4>
<p>Basically, is being able to stop solving based solely on time a good start for now?</p>



<a name="185651325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651325">(Jan 14 2020 at 23:06)</a>:</h4>
<p>Hm, that makes me think....</p>
<p>If chalk supports <code>should_continue</code> in that PR, does that mean that <a href="https://github.com/rust-lang/chalk/issues/260" target="_blank" title="https://github.com/rust-lang/chalk/issues/260">https://github.com/rust-lang/chalk/issues/260</a> is also fixed?</p>



<a name="185651338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651338">(Jan 14 2020 at 23:06)</a>:</h4>
<p>I imagine that these are actually more-or-less equivalent</p>



<a name="185651511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651511">(Jan 14 2020 at 23:09)</a>:</h4>
<p>No, it's still not UnwindSafe</p>



<a name="185651574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/panic%3A%20truncate%20extracted%20a%20pending%20value/near/185651574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/panic.3A.20truncate.20extracted.20a.20pending.20value.html#185651574">(Jan 14 2020 at 23:09)</a>:</h4>
<p>I have some thoughts on how to make it so, but it's a bit low priority right now</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>